|
Oracle® Database Globalization Development Kit Java API Reference 10g Release 2 (10.2) Part No. B14224-02 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.io.InputStream
|
+--java.io.FilterInputStream
|
+--java.io.BufferedInputStream
|
+--oracle.i18n.text.UTF8ValidationFilter
The UTF8ValidationFilter class is used to check the illegal
UTF-8 byte sequence to replace with the replacement character U+FFFD
or raise an exception.
The validation occurs transparently for the users. The output has the same
contents as the input if an invalid UTF-8 sequence is not found. If an
invalid UTF-8 sequence is found and UTF8ValidationFilter.ValidationBehavior.REPLACE
is specified as the conversion behavior, the output will include U+FFFD,
or 0xef, 0xbf, 0xbd in UTF-8 encoding where the problem occurs. By
default, the illegal UTF-8 sequence is reported by the exception
UTFDataFormatException.
| Nested Class Summary | |
static class |
UTF8ValidationFilter.ValidationBehavior
The ValidationBehavior class is the class used to determine
the behavior in case the conversion fails. |
| Field Summary |
| Fields inherited from class java.io.BufferedInputStream |
buf, count, marklimit, markpos, pos |
| Fields inherited from class java.io.FilterInputStream |
in |
| Constructor Summary | |
UTF8ValidationFilter(InputStream in)
Constructs the object with the InputStream object. |
|
UTF8ValidationFilter(InputStream in,
int size)
Constructs the object with the InputStream object
with the buffer size. |
|
UTF8ValidationFilter(InputStream in,
int size,
UTF8ValidationFilter.ValidationBehavior action)
Constructs the object with the InputStream object
with the buffer size and the validation behavior. |
|
| Method Summary | |
int |
read()
Reads one byte. |
int |
read(byte[] b,
int off,
int len)
Reads the byte array. |
| Methods inherited from class java.io.BufferedInputStream |
available, close, mark, markSupported, reset, skip |
| Methods inherited from class java.io.FilterInputStream |
read |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public UTF8ValidationFilter(InputStream in)
InputStream object.
in - the InputStream object
public UTF8ValidationFilter(InputStream in,
int size)
InputStream object
with the buffer size.
in - the InputStream objectsize - the buffer size
public UTF8ValidationFilter(InputStream in,
int size,
UTF8ValidationFilter.ValidationBehavior action)
InputStream object
with the buffer size and the validation behavior.
in - the InputStream objectsize - the buffer sizeaction - specifies the error action to be either
REPLACE or REPORT| Method Detail |
public int read()
throws UTFDataFormatException,
IOException
read in class BufferedInputStreamUTFDataFormatException - if any illegal UTF-8 sequence is found
IOException - if any other I/O error occurs
public int read(byte[] b,
int off,
int len)
throws UTFDataFormatException,
IOException
read in class BufferedInputStreamb - bufferoff - offsetlen - length
UTFDataFormatException - if any illegal UTF-8 sequence is found
IOException - if any other I/O error occurs
|
Oracle® Database Globalization Development Kit Java API Reference 10g Release 2 (10.2) Part No. B14224-02 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||